Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(client/cordova/apple/ios): fix failing release build for the cordova ios target #1840

Merged
merged 4 commits into from
Feb 27, 2024

Conversation

daniellacosse
Copy link
Contributor

@daniellacosse daniellacosse commented Feb 15, 2024

I was getting multiple errors attempting to build the latest release for ios:

  1. It seems we require a greater deployment target. The xcode CLI won't build for 11, saying the supported range is 12 - 17.
  2. Our security group entitlements for ios had macos specific groups in them, which I assume were being ignored before.

@daniellacosse daniellacosse changed the title fix(cordova/apple/ios): fix failing build for the cordova ios target fix(cordova/apple/ios): fix failing release build for the cordova ios target Feb 15, 2024
Copy link

codecov bot commented Feb 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 32%. Comparing base (81abbb9) to head (c8f74ec).
Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #1840    +/-   ##
=======================================
- Coverage      40%     32%    -8%     
=======================================
  Files          39      45     +6     
  Lines        1805    2610   +805     
  Branches      337     337            
=======================================
+ Hits          738     859   +121     
- Misses       1067    1751   +684     
Flag Coverage Δ
apple 15% <ø> (?)
ios 15% <ø> (?)
maccatalyst 15% <ø> (?)
macos 15% <ø> (?)
unittests 32% <ø> (-8%) ⬇️
www 40% <ø> (-1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@daniellacosse daniellacosse marked this pull request as ready for review February 15, 2024 23:39
@daniellacosse daniellacosse requested a review from a team as a code owner February 15, 2024 23:39
@@ -11,7 +11,6 @@
<key>com.apple.security.application-groups</key>
<array>
<string>group.org.outline.ios.client</string>
<string>$(TeamIdentifierPrefix)org.outline.macos.client</string>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sbruens will this break mac Catalyst?

I don't understand why having this would break the build, since an app can be in multiple application groups. Perhaps we need to configure the application group to include the ios app.

Copy link
Contributor Author

@daniellacosse daniellacosse Feb 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when it fails it says that the provision (org.outline.ios.client) doesn't match what's in this group (e.g. the macos group). perhaps we can use the interpolation to change this at compile time?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will most likely break macOS, because they share this file.
Please wait for @sbruens to chime in.
Other than that, Makefile and pbxproj look good.

Copy link
Contributor

@sbruens sbruens Feb 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will break catalyst because this app group is used in several places to share data between the network extension, launcher and host app, like the logs directory for Sentry and the tunnel store (see https://github.com/search?q=repo%3AJigsaw-Code%2Foutline-client%20%22QT8Z3Q9V3A.org.outline.macos.client%22&type=code).

Those values need to match the app groups the app has access to. I think we may be able to move catalyst over to use the ios app group but it would mean that the catalyst app would no longer use the existing mac paths for logs and tunnel store preferences, but that might be ok?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw I added those entitlements very recently: #1811

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps the iOS app provisioning profile needs to be updated online to add those groups?

Copy link
Contributor

@sbruens sbruens Feb 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the problem is that macOS groups are special and not managed in the Developer portal. So you can't even create an app group that doesn't start with group..

That app groups shouldn't be set on the iOS app anyway. But the XCode UI is weird where it automatically adds macOS app groups to the iOS section (but not the other way around?). Is there a way to set them in the release script?

I guess the best course of action would be to update those hard-coded values and move catalyst over to the iOS app group.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the user lose their server list? That would be a very bad experience.
Perhaps we need separate projects? Can we have a per-platform plist?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. They are not stored under the app group.

@daniellacosse you should be able to check that by running the catalyst app after you change these values and checking that your servers show up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, still seeing my servers:

Screenshot 2024-02-22 at 10 09 22 AM

@fortuna fortuna requested a review from sbruens February 16, 2024 00:22
Copy link
Contributor

@jyyi1 jyyi1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure whether it's related (maybe not), but @sbruens and I discovered that the latest Gomobile behaves weirdly until a go get xxx/gomobile is run targeting the root folder.

Makefile Show resolved Hide resolved
@fortuna
Copy link
Collaborator

fortuna commented Feb 23, 2024 via email

@daniellacosse
Copy link
Contributor Author

daniellacosse commented Feb 23, 2024 via email

Copy link
Contributor

@jyyi1 jyyi1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Please also let the QA team test the following behavior on macOS once the PR is merged:

  1. Install an old version
  2. Add some servers (ss:// and ssconf://)
  3. Upgrade to the new version
  4. Make sure all servers and configurations are still there

@daniellacosse daniellacosse changed the title fix(cordova/apple/ios): fix failing release build for the cordova ios target fix(client/cordova/apple/ios): fix failing release build for the cordova ios target Feb 27, 2024
@daniellacosse
Copy link
Contributor Author

LGTM. Please also let the QA team test the following behavior on macOS once the PR is merged:

  1. Install an old version
  2. Add some servers (ss:// and ssconf://)
  3. Upgrade to the new version
  4. Make sure all servers and configurations are still there

I'm gonna merge this, considering it's semi-blocking release

@daniellacosse daniellacosse merged commit f3e10d6 into master Feb 27, 2024
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants